/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.live.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author lhd
 * @date 2020-08-06 16:29:53
 */
@Data
@TableName("tz_live_room")
public class LiveRoom implements Serializable{
    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty(value = "直播间id")
    private Long id;

    @ApiModelProperty(value = "店铺id")
    private Long shopId;

    @ApiModelProperty(value = "微信直播间id")
    private Integer roomId;

    @ApiModelProperty(value = "直播间名称")
    private String name;

    @ApiModelProperty(value = "主播昵称")
    private String anchorName;

    @ApiModelProperty(value = "背景图")
    private String coverImg;

    @ApiModelProperty(value = "主播分享图")
    private String shareImg;

    @ApiModelProperty(value = "购物直播频道封面图")
    private String feedsImg;

    @ApiModelProperty(value = "直播间类型 1: 推流，0：手机直播")
    private Integer type;

    @ApiModelProperty(value = "0.竖屏 1.横屏")
    private Integer screenType;

    @ApiModelProperty(value = "是否置顶 1.是 2.不是")
    private Integer roomTop;

    @ApiModelProperty(value = "直播间状态。101：直播中，102：未开始，103已结束，104禁播，105：暂停，106：异常，107：已过期 -1：已删除")
    private Integer liveStatus;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "直播开始时间")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "直播结束时间")
    private Date endTime;

    @ApiModelProperty(value = "主播微信号")
    private String anchorWechat;

    @ApiModelProperty(value = "购物直播频道封面图微信mediaId")
    private String feedsImgId;

    @ApiModelProperty(value = "购物直播频道背景图微信mediaId")
    private String coverImgId;

    @ApiModelProperty(value = "购物直播频道分享图微信mediaId")
    private String shareImgId;

    @ApiModelProperty(value = "是否开启官方收录")
    private Integer isFeedsPublic;

    @ApiModelProperty(value = "直播间功能")
    private String roomTools;

    @ApiModelProperty(value = "直播间功能")
    @TableField(exist = false)
    private LiveRoom.RoomToolsVO roomToolsVo;

    @ApiModelProperty(value = "申请时间")
    private Date applyTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "商品信息")
    @TableField(exist = false)
    private List<LiveProdStore> liveProdStores;

    @Data
    public static class RoomToolsVO {

        @ApiModelProperty(value = "是否关闭客服 0 开启，1 关闭")
        private Integer closeKf;

        @ApiModelProperty(value = "是否关闭点赞  0 开启，1 关闭")
        private Integer closeLike;

        @ApiModelProperty(value = " 是否关闭货架  0 开启，1 关闭")
        private Integer closeGoods;

        @ApiModelProperty(value = "是否关闭评论  0 开启，1 关闭")
        private Integer closeComment;

        @ApiModelProperty(value = " 是否关闭回放  0 开启，1 关闭")
        private Integer closeReplay;

        @ApiModelProperty(value = "是否关闭分享  0 开启，1 关闭")
        private Integer closeShare;
    }
}
